//package temp;
//import java.io.File;
//import java.util.List;
//
//import org.apache.maven.model.Dependency;
//import org.apache.maven.model.building.DefaultModelBuilderFactory;
//import org.apache.maven.model.building.DefaultModelBuildingRequest;
//import org.apache.maven.model.building.ModelBuildingException;
//import org.apache.maven.model.building.ModelBuildingResult;
//
//public class RunDepJar {
//
//	public static void main(String[] args) throws ModelBuildingException {
//		 ModelBuilder builder = new DefaultModelBuilderFactory().newInstance();
//	        DefaultModelBuildingRequest request = new DefaultModelBuildingRequest();
//	        request.setPomFile( new File( "test-pom.xml").getAbsoluteFile() );
//	        ModelBuildingResult result = builder.build( request );
//	        System.out.println( result.getEffectiveModel().getDependencies());
//	        List<Dependency>  dpendencyList=result.getEffectiveModel().getDependencies();
//	        for (Dependency dependency : dpendencyList) {
//				System.out.println("依赖工具包名"+dependency.getArtifactId());
//			}
//	}
//
//}
